package com.flying.invest.strategy.service;

import java.util.Date;

import com.flying.common.annotation.DaoCreate;
import com.flying.common.annotation.DaoQuery;
import com.flying.common.annotation.DaoRemove;
import com.flying.common.annotation.DaoUpdate;
import com.flying.common.util.Codes;
import com.flying.framework.annotation.MethodInfo;
import com.flying.framework.annotation.Param;
import com.flying.framework.annotation.Service;
import com.flying.framework.service.AbstractService;
import com.flying.framework.model.ActionResult;
import com.flying.framework.model.QueryResult;

import com.flying.invest.strategy.model.StrategyInvestMonitorDetail;

@Service(value="StrategyInvestMonitorDetailService", desc="投资监控策略明细")
public class StrategyInvestMonitorDetailService extends AbstractService{
        
	@MethodInfo("新增")
	@DaoCreate(entity=StrategyInvestMonitorDetail.ENTITY_NAME)
	public StrategyInvestMonitorDetail create(
			@Param(value=StrategyInvestMonitorDetail.USER_ID, required=true,	desc="所属用户") Long user_id,
			@Param(value=StrategyInvestMonitorDetail.TYPE_ID, required=true,	desc="策略类型") Long type_id,
			@Param(value=StrategyInvestMonitorDetail.INVEST_ID, required=true,	desc="投资项目") Long invest_id,
			@Param(value=StrategyInvestMonitorDetail.STRATEGY_ID, required=true,	desc="策略ID") Long strategy_id,
			@Param(value=StrategyInvestMonitorDetail.TRANSACTION_TYPE, required=false,	desc="交易类型") Integer transaction_type,
			@Param(value=StrategyInvestMonitorDetail.PLAN_AMOUNT, required=false,	desc="计划交易金额") Double plan_amount,
			@Param(value=StrategyInvestMonitorDetail.PLAN_QUANTITY, required=false,	desc="计划交易数量") Double plan_quantity,
			@Param(value=StrategyInvestMonitorDetail.PLAN_PRICE, required=false,	desc="计划交易价格") Double plan_price,
			@Param(value=StrategyInvestMonitorDetail.CREATE_TIME, required=false,	desc="创建时间") Date create_time
		) {
		return null;
	}

	@MethodInfo("修改")
	@DaoUpdate(entity=StrategyInvestMonitorDetail.ENTITY_NAME)
	public ActionResult update(
		
			@Param(value=StrategyInvestMonitorDetail.DETAIL_ID, required=true,	desc="明细ID") Long detail_id,
			@Param(value=StrategyInvestMonitorDetail.USER_ID, required=true,	desc="所属用户") Long user_id,
			@Param(value=StrategyInvestMonitorDetail.TYPE_ID, required=true,	desc="策略类型") Long type_id,
			@Param(value=StrategyInvestMonitorDetail.INVEST_ID, required=true,	desc="投资项目") Long invest_id,
			@Param(value=StrategyInvestMonitorDetail.STRATEGY_ID, required=true,	desc="策略ID") Long strategy_id,
			@Param(value=StrategyInvestMonitorDetail.TRANSACTION_TYPE, required=false,	desc="交易类型") Integer transaction_type,
			@Param(value=StrategyInvestMonitorDetail.PLAN_AMOUNT, required=false,	desc="计划交易金额") Double plan_amount,
			@Param(value=StrategyInvestMonitorDetail.PLAN_QUANTITY, required=false,	desc="计划交易数量") Double plan_quantity,
			@Param(value=StrategyInvestMonitorDetail.PLAN_PRICE, required=false,	desc="计划交易价格") Double plan_price,
			@Param(value=StrategyInvestMonitorDetail.AMOUNT, required=false,	desc="实际交易金额") Double amount,
			@Param(value=StrategyInvestMonitorDetail.QUANTITY, required=false,	desc="实际交易数量") Double quantity,
			@Param(value=StrategyInvestMonitorDetail.PRICE, required=false,	desc="实际交易价格") Double price,
			@Param(value=StrategyInvestMonitorDetail.TRANSACTION_ID, required=true,	desc="交易ID") Long transaction_id,
			@Param(value=StrategyInvestMonitorDetail.CREATE_TIME, required=false,	desc="创建时间") Date create_time,
			@Param(value=StrategyInvestMonitorDetail.TRANSACTION_TIME, required=false,	desc="交易时间") Date transaction_time
		) {
		return null;
	}

	@MethodInfo("修改")
	@DaoUpdate(entity=StrategyInvestMonitorDetail.ENTITY_NAME)
	public ActionResult updateByTransaction(
			@Param(value=StrategyInvestMonitorDetail.DETAIL_ID, required=true,	desc="明细ID") Long detail_id,
			@Param(value=StrategyInvestMonitorDetail.AMOUNT, required=false,	desc="实际交易金额") Double amount,
			@Param(value=StrategyInvestMonitorDetail.QUANTITY, required=false,	desc="实际交易数量") Double quantity,
			@Param(value=StrategyInvestMonitorDetail.PRICE, required=false,	desc="实际交易价格") Double price,
			@Param(value=StrategyInvestMonitorDetail.TRANSACTION_ID, required=true,	desc="交易ID") Long transaction_id,
			@Param(value=StrategyInvestMonitorDetail.TRANSACTION_TIME, required=false,	desc="交易时间") Date transaction_time
		) {
		return null;
	}

	@MethodInfo("删除")
	@DaoRemove(entity=StrategyInvestMonitorDetail.ENTITY_NAME)
	public ActionResult remove(
		
			@Param(value=StrategyInvestMonitorDetail.DETAIL_ID, required=true,	desc="明细ID") Long detail_id
		) {
		return null;
	}

	@MethodInfo("搜索")
	@DaoQuery(entity=StrategyInvestMonitorDetail.ENTITY_NAME, pageable=true, modelClass=StrategyInvestMonitorDetail.class)
	public QueryResult<StrategyInvestMonitorDetail> findAll(
			@Param(value=Codes.PAGE_NUM, 	required=false, desc="分页页号，默认0") int page,
			@Param(value=Codes.PAGE_SIZE, 	required=false, desc="分页大小，默认10") int rows) {
		return null;
	}

	@MethodInfo("查询")
	@DaoQuery(entity=StrategyInvestMonitorDetail.ENTITY_NAME, single=true, throwsNotFoundException=true )
	public StrategyInvestMonitorDetail findById(
		
			@Param(value=StrategyInvestMonitorDetail.DETAIL_ID, required=true,	desc="明细ID") Long detail_id
		) {
		return null;
	}

}